efi_selftest: block device: avoid read after free
authorHeinrich Schuchardt <[email protected]>
Fri, 21 Dec 2018 23:37:41 +0000 (00:37 +0100)
committerAlexander Graf <[email protected]>
Sun, 23 Dec 2018 01:04:25 +0000 (02:04 +0100)
commit05aceb2b1c9d88aafcb8dfbedb24742a24d986ba
tree0e1bf07eb0283cfc68f5de4ffa72932c944b85d4
parent1f2e948d6d53f77a2ddb2dde3531b0d5bc2815ad
efi_selftest: block device: avoid read after free

Reading the position in a file after closing the same results in a read
after free.

Correct the sequence in the test.

Reported-by: Marek Vasut <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
lib/efi_selftest/efi_selftest_block_device.c